/// @tags: StirlingNumber
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <cstring>
#include <iostream>

using namespace std;

namespace BlueQuantum {

typedef long long ll;

int const N = 1 << 19, P = 167772161, g = 3, ig = 55924054;

class Polynomial {
 private:
  int f[N];

 public:
  void NTT(bool const typ, int const n);
  int *operator&() { return f; }
  int &operator[](int index) { return f[index]; };
  int const &operator[](int index) const { return f[index]; };
} F, G;

int n, m;
int fac[N], inv[N], cvt[N];

inline ll qpow(ll base, int exp) {
  ll Res = 1;
  while (exp) {
    if (exp & 1) Res = Res * base % P;
    base = base * base % P;
    exp >>= 1;
  }
  return Res;
}

/// @param typ 正/逆向 @param n 项数 必须是2的整数次幂
inline void Polynomial::NTT(bool const typ, int const n) {
  for (int i = 1; i < n; ++i)
    if (i < cvt[i]) swap(f[i], f[cvt[i]]);
  for (int i = 2; i <= n; i <<= 1) {
    int mid = i >> 1, wn = qpow(typ ? g : ig, (P - 1) / i);
    for (int j = 0; j < n; j += i) {
      ll wk = 1;
      for (int k = 0; k < mid; ++k, (wk *= wn) %= P) {
        ll t = wk * f[j + k + mid] % P;
        if ((f[j + k + mid] = f[j + k] - t) < 0) f[j + k + mid] += P;
        if ((f[j + k] += t) >= P) f[j + k] -= P;
      }
    }
  }
  if (!typ) {
    ll inv = qpow(n, P - 2);
    for (int i = 0; i < n; ++i) f[i] = inv * f[i] % P;
  }
}

inline int main() {
  cin >> n;
  fac[0] = 1;
  for (int i = 1; i <= n; ++i) fac[i] = 1ll * fac[i - 1] * i % P;
  inv[n] = qpow(fac[n], P - 2);
  for (int i = n - 1; i >= 0; --i) inv[i] = 1ll * inv[i + 1] * (i + 1) % P;
  for (int i = 0; i <= n; ++i) {
    F[i] = qpow(i, n) * inv[i] % P;
    G[i] = (i & 1) ? P - inv[i] : inv[i];
  }
  int maxl = 1;
  while (maxl < n + n + 2) maxl <<= 1;
  for (int i = 1; i <= maxl; ++i) cvt[i] = cvt[i >> 1] >> 1 | ((i & 1) ? maxl >> 1 : 0);
  F.NTT(true, maxl), G.NTT(true, maxl);
  for (int i = 0; i < maxl; ++i) F[i] = 1ll * F[i] * G[i] % P;
  F.NTT(false, maxl);
  for (int i = 0; i <= n; ++i) cout << F[i] << ' ';
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("StirlingNumber.in", "r", stdin);
  freopen("StirlingNumber.out", "w", stdout);
#endif
#endif

  ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
